home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
001-025
/
scopedisk20
/
gwcalc
/
gwcalc.doc
< prev
next >
Wrap
Text File
|
1995-03-18
|
4KB
|
148 lines
gwCalc.doc Document for 5/18/87
`gwCalc' an ? easily programmable calculator
Copyright (c) 1987 by Gaylan Wallis ; ALL RIGHTS RESERVED
Permission is granted to use, copy, and distribute the program `gwCalc'
providing that no fee shall be charged for such copying and distribution,
and that both `gwCalc' and `gwCalc.doc' are distributed together and in
their unmodified state.
Disclaimer: This program is provided `as is' without warranty of any
kind, either expressed or implied. Gaylan Wallis does not warrant,
guarantee or make any representations regarding the use of the program
in terms of correctness, accuracy, reliability, currentness, or other-
wise and will not be liable for direct, indirect, incidental, or con-
sequential damages resulting from any defect in the program.
gwCalc
gwCalc is much different than most calculators for the Amiga.
Instead of emulating an existing calculator along with its limitations.
Why not create one that takes advantage of the Amiga's design? Thats
the theory anyway. The heart of gwCalc is the ability to solve simple
equations and display more information than a standard calculator does.
General Description
When executed, gwCalc activates the main equation string gadget for
keyboard input. Simply type your equation in and upon a `Return' the
expression is evaluated and the result is placed just above in the Main
Display.
At the top. a paper tape is simulated to show a history of your work
and, four memory locations are at the bottom. 2 other equation boxes are
just below the Main Equation box. They differ from the main in that they
are not cleared when evaluated. The ` = ', ` e1 ', ` e2 ' little gadgets
cause the respective equations to be evaluated.
The ` clr e ' gadget will clear all the equation boxes and the ` clr r '
gadget clears all 4 memory registers.
Sorry, the registers are not gadgets, you can click-em all you want
but no workee.
Equations
Equations consist of numeric values separated by operators. They
may also contain store register commands.
Math Operators:
+ Add
- Subtract
* Multiply
/ Division
= Equals
Numeric values: 3-types
a numeric representation like 123.34 or 99.0 or -1112223
no exponents.
leading minus sign legal but must follow a math operator.
a memory register.
the result of an equation.
Memory Operations:
s# Store to register # (where # is 1-4)
r# Recall from register #
Equation Operations:
an e1 or e2 within an equation causes the repective equation
to be evaluated and the result returned as a numeric value.
A valid equation may start with either a Numeric value, register
value, an operand, or a store command. If an equation begins with an
operator, the main display is used as the first value in the operation.
If an equation begins with a numeric value, the value in the Main Display
is ignored.
Equations are evaluated left to right. The store register command
can be anywhere within and equation.
Quick tutorial:
enter the -> equations into the main equation box and type return after
each.
Add 2 numbers.
-> 123+34
Store this number in register 1.
-> s1
Clear the calculator.
-> 0
Add a series of numbers and save result in register 2.
-> 24
-> +36
-> +24
-> +32
-> s2
This could also have been typed as one line.
-> 24+36+24+32s2
Spaces are permitted between fields and equal signs are optional.
-> 24 + 36 + 24 + 32 = s2
Add register 1 plus register 2 and store result in register 3
-> r1 + r2 = s3
Enter a negative number
-> 0 - 45.66
** Now a short program which takes the number you enter in the
main box and divides it by a constant in register 2.
Put this nextline in the e1 box.
-> / r2 =
Now back to the main box to use the program.
-> 58e1
-> 29e1
-> 23e1
By the way if just an `e' is on the end of a equation it defaults to e1 if
the digit 1 or 2 is missing.
-> 87e
** Watching interest compound.
Enter a beggining balance to register 1.
-> 100.00s1
Enter an interest rate multiplier to register 2. 8.25%
-> 1.0825s2
Enter the next equation in the e1 box
-> r1 * r2 = s1
Now everytime you click the little e1 box interest is added to the
value in register 1.
** Thats all you get now.
Don't be afraid to try things like having `e1' call `e2'.